package com.design.interpreter.format;

import java.util.Date;

// 上下文类，用于解释和格式化日期
class DateFormatContext {
    private FormatExpression expression;

    public DateFormatContext(FormatExpression expression) {
        this.expression = expression;
    }

    public String format(Date date) {
        return expression.interpret(date);
    }
}
